package com.imooc.mapper;

import com.imooc.vo.ItemCommentVo;
import com.imooc.vo.SearchItemsVo;
import com.imooc.vo.ShopcartVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItemsMapperCustom  {

    List<ItemCommentVo> queryItemComments(@Param("paramMap") Map<String,Object> map);

    List<SearchItemsVo> searchItems(@Param("paramMap") Map<String, Object> paramMap);

    /**
     * paramMap.catId
     * @param paramMap
     * @return
     */
    List<SearchItemsVo> searchItemsByThirdCat(@Param("paramMap") Map<String, Object> paramMap);

    /**
     * 根据
     * @param vos
     * @return
     */
    List<ShopcartVo> queryItemsBySpecIds(@Param("vos") List<String> vos);

    /**
     * 查询商品特定类型评价数量
     * @param itemId    商品编号
     * @param level 等级  {@link com.imooc.enums.CommentLevel}
     * @return
     */
    Integer queryCommentLevelCount(@Param("itemId") String itemId,@Param("level") Integer level);
}